package cn.itcast.nems.studentrecord.service;

import cn.itcast.ic.common.bean.Page;
import cn.itcast.nems.common.PageQueryModel;
import cn.itcast.nems.studentrecord.dao.entity.ReceivableAdjustment;
import cn.itcast.nems.studentrecord.dto.ReceivableAdjustmentDTO;
import cn.itcast.nems.studentrecord.dto.ReceivableAdjustmentQueryDTO;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.lang.NonNull;

public interface ReceivableAdjustmentService extends IService<ReceivableAdjustment> {
    /**
     * 分页查询
     * @author 高昌露 
     * @since 2023/11/22 13:54
     * @param queryModel 查询条件
     * @return cn.itcast.ic.common.bean.Page<cn.itcast.nems.studentrecord.dto.ReceivableAdjustmentDTO>
     */
    Page<ReceivableAdjustmentDTO> pageList(PageQueryModel<ReceivableAdjustmentQueryDTO> queryModel);

    /**
     * 根据ID获取详情
     * @author 高昌露
     * @since 2023/11/23 14:14
     * @param id 凭单ID
     * @return cn.itcast.nems.studentrecord.dto.ReceivableAdjustmentDTO 调价单详情
     */
    ReceivableAdjustmentDTO queryById(@NonNull String id);

    /**
     * 根据学籍ID获取调价单详情
     * @author 高昌露
     * @since 2023/11/23 15:07
     * @param studentRecordId 学籍ID
     * @return cn.itcast.nems.studentrecord.dto.ReceivableAdjustmentDTO 调价单详情
     */
    ReceivableAdjustmentDTO queryByStudentRecord(@NonNull String studentRecordId);

    /**
     * 保存为草稿
     *
     * @param reqParam 需要修改的数据信息
     * @return cn.itcast.nems.studentrecord.dto.ReceivableAdjustmentDTO 修改后结果
     * @author 高昌露
     * @since 2023/11/23 14:16
     */
    String saveOrEdit(@NonNull ReceivableAdjustmentDTO reqParam);

    /**
     * 删除
     *
     * @param id 凭单ID
     * @author 高昌露
     * @since 2023/11/23 14:17
     */
    void delete(@NonNull String id);

    /**
     * 提交到工作流
     *
     * @param dto 调价单详情
     * @author 高昌露
     * @since 2023/11/23 16:25
     */
    String commitToBPM(ReceivableAdjustmentDTO dto);
}
